package thread;

public class RunnableDemo implements Runnable{

	public void run() {
		for(int i=1;i<21;i++){
			System.out.println(Thread.currentThread().getName()+":"+i);
		}
		System.out.println(Thread.currentThread().getName()+"的优先级是"+Thread.currentThread().getPriority());
	}
	public static void main(String[] args) {
		Thread t = new Thread(new RunnableDemo(),"11#");
		t.start();
		for(int i=0;i<10;i++){
			//new Thread(new RunnableDemo(),i+"#").start();
			//new Thread(new RunnableDemo(),i+"#").run();
		}
	}
}
